import java.util.Scanner;

public class java24 {
    public static void main(String[] args) {
    int a[]=new int[100];
    int n;
    int from,to;
    Scanner sc=new Scanner(System.in);
    System.out.println("Enter the size of array");
    n=sc.nextInt();
    for(int i=1;i<=n;i++)
    {
        a[i]=sc.nextInt();
    }
    from=sc.nextInt();
    to=sc.nextInt();
    int[] ans=copy(a,from,to);
    for(int i=1;i<=to-from+1;i++)
    {
        System.out.print(ans[i]+" ");
    }
    System.out.println();
    }

    public static int[] copy(int a[],int from,int to)
    {
        int newa[]=new int[100];
        for(int i=from,index=1;i<=to;i++,index++)
        {
            newa[index]=a[i];
        }
        return newa;
    }


}
